%w(keys indifferent_access deep_merge reverse_merge conversions diff slice except).each do |ext|
  require "active_support/core_ext/hash/#{ext}"
end

class Hash #:nodoc:
  include ActiveSupport::CoreExtensions::Hash::Keys
  include ActiveSupport::CoreExtensions::Hash::IndifferentAccess
  # DeepMerge和Reverseerg都用于拷贝,DeepMerge使用递归形式进行深拷贝合并
  # ReverseMerge则和merge方法在操作的对象上是相反的
  # changed by bonyfish choi on 2009-04-01
  include ActiveSupport::CoreExtensions::Hash::DeepMerge
  include ActiveSupport::CoreExtensions::Hash::ReverseMerge
  include ActiveSupport::CoreExtensions::Hash::Conversions
  include ActiveSupport::CoreExtensions::Hash::Diff # 获取两个Hash的不同之处
  # Slice和Except都用于过滤key,不同的是Slice给出保留的key,Except给出排除的key
  # changed by bonyfish choi on 2009-04-01
  include ActiveSupport::CoreExtensions::Hash::Slice
  include ActiveSupport::CoreExtensions::Hash::Except
end
